<form action="" method="get">
	<p><label>你匹配的正则式是:</label><input type="text" name="zhenzhe" /></p>
	
	<p><input type="submit" value="确定"/></p>

</form>

<br/><br/>
<hr />
<br/><br/>

<?php 
	
	$content = '';
	//$str = $_GET['zhenzhe'];
	//$str = "admSD";
	//$mode = "/^adm/ies";
	//$mode = '/in$/i';
	//$str = "admIN";
	//$mode = "/[Tt][Mm]/";
	//$str = "Tm";
	//$mode = "/(T|t)(M|m)/";
	//$str ="tM";
	//$mode = "/tm/i";
	//$str ="tM";
	//限定符
	//$mode = "/go{3}le/";
	//$str = "goooooooole";
	//$str = "gooolessss";
	//$mode = "/^s(.){5}st$/";
	//$str = "srssdest";
	//$mode = "/\bhi\b/i";
	//$str = "hib HI";
	//$mode = "/hxf(.*){5}heenting/is";
	//$str = "hxforreeer\nrheenting";
	//$mode = "/0\d{2}-\d{8}/";
	//$str = "080-12345567";
	//$mode ="/\ba.\w*\b/";
	//$str = "a9s";
	//$mode = "/\d*/";
	//$str = "12112wewfwef";
	//$mode = "/^\d{5,10}$/";
	//$str ="12345679";
	//$mode = "/[aeiou]/";
	//$str = "ae";
	//$mode ="/(\d{1,3}\.){3}\d{1,3}/";
	//$mode = "/((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)/";
	//$str = "1.1.224.100";
	//$mode = "/(0\d{2})\)?(\d{11})|\(?(0\d{2})\)?(\d{11})|0(\d{2})[-](\d{11})/";
	//$str = "020-13500503210";
	//$mode ="/[^d]\i/";
	//$str ="D";
	//$mode = "/<(.*)(.*)>.*<\/\1>|<(.*) \/>/";
	//$str ="<div>swefwfew</div>";
	$mode = "/go*gle/";
	$str ="ggle";




	
	
	if(preg_match($mode, $str, $content)){
		echo '你输入的<font style="font-weight: bold; padding:0 5px; color: red">'.$str.'</font>和<font style="font-weight: bold; padding:0 5px; color: red">'.$mode.'</font>匹配成功'.'匹配的配是:<font style="font-weight: bold; color:red;">'.$content['0']."</font>";
	}else{
		echo '你输入的'.$str.'和'.$mode.'匹配不成功';	
	}
	
	echo "<br />";
	$str1 = "select * from `tabname` where `id` = '23'";
	echo $str1;
	echo "<br />=====================<br />";
	$str2 = addslashes($str1);
	echo $str2;
	echo "<br />=======stripcslashes=======<br />";
	$str3 = stripcslashes($str2);
	echo $str3;
	echo "<br />========strcmp========<br />";
	$str4 = "hello word";
	$str5 = "hello Word";
	//$buffer = strcmp($str4, $str5);
	$buffer = strcasecmp($str4, $str5);
	
	if('0' == $buffer){
		echo "相同";
	}elseif('0' > $buffer){
		echo "不相同";
	}else if('0' < $buffer){
		echo "不相同";
	}










		

?>
